Conversation
| ClientController cc; | ||
|
|
||
| GroupController(ClientController cc) { | ||
| public GroupController(ClientController cc) { |
There was a problem hiding this comment.
Не надо. Обращаемся через ClientController...
| } | ||
| } | ||
|
|
||
| public Group findGroup (String name) { |
There was a problem hiding this comment.
... У этого метода убери public и сделай публичный в ClienController, из которого и запускай данный метод GroupController'а.
| } | ||
|
|
||
| public Group findGroup (String name) { | ||
| Group group = new Group(); |
There was a problem hiding this comment.
Группу (с её информацией) надо получить с сервера...
| @FXML | ||
| public void findContact(KeyEvent keyEvent) { | ||
| if (chats.isSelected()) { | ||
| groupSearchListView.getItems().clear(); |
There was a problem hiding this comment.
А не может быть случая groupSearchListView == null...? ;)
| User us = new User(); | ||
| us.setId(findGroup.getGid()); | ||
| us.setUserName(findGroup.getGroup_name()); | ||
| temp.setUser(us); |
There was a problem hiding this comment.
Может быть сразу сделаем без этого костыля...?))
PaLoMaster
left a comment
There was a problem hiding this comment.
И в слаке ещё один вопрос (по 781ой строке ChatViewController)...
| try { | ||
| ServerResponse response = HTTPSRequest.getGroupInfo(groupName, token); | ||
|
|
||
| ServerResponse response = HTTPSRequest.getGroupInfo(groupId, token); |
There was a problem hiding this comment.
Это старый метод. Надо реализовать по аналогии со строкой 78.
|
|
||
| public static ServerResponse getGroupInfo(String id, String token) throws Exception { | ||
| HttpsURLConnection connection = getConnection("/v1/chats/" + id, "GET", token); | ||
| HttpsURLConnection connection = getConnection("/groups/%id=" + id, "GET", token); |
There was a problem hiding this comment.
Это к старому бэкенду был. Сейчас переделываем и этот метод надо будет удалить.
Заглушка по поиску группы
https://trello.com/c/Lx9uwrSh/125-%D1%80%D0%B5%D0%B0%D0%BB%D0%B8%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B8%D1%81%D0%BA-%D0%B3%D1%80%D1%83%D0%BF%D0%BF